package com.weibo4j.api.domain;

import java.util.Date;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;


public class Status {
	
	private User user;
	
	@JSONField(name = "created_at", format = "EEE MMM dd HH:mm:ss Z yyyy")
	private Date createdAr;
	
	private Long id;
	
	private String text;
	
	private String source;
	
	private Boolean favorited;
	
	private Boolean truncated;
	
	@JSONField(name = "inReplyToStatusId")
	private String in_reply_to_status_id;
	
	@JSONField(name = "in_reply_to_user_id")
	private String inReplyToUserId;
	
	@JSONField(name = "in_reply_to_screen_name")
	private String inReplyToScreenName;
	
	private Geo geo;
	
	private String mid;
	
	@JSONField(name = "reposts_count")
	private Integer repostsCount;
	
	@JSONField(name = "comments_count")
	private Integer commentsCount;
	
	private List<Place> annotations;
	
	@JSONField(name = "thumbnail_pic")
	private String thumbnailPic;
	
	@JSONField(name = "bmiddle_pic")
	private String bmiddlePic;
	
	@JSONField(name = "original_pic")
	private String originalPic;
	
	private Integer mlevel;
	
	private Visible visible;
	
	@JSONField(name = "retweeted_status")
    private Status retweetedStatus;

    public Status getRetweetedStatus() {
        return retweetedStatus;
    }

    public void setRetweetedStatus(Status retweetedStatus) {
        this.retweetedStatus = retweetedStatus;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Date getCreatedAr() {
        return createdAr;
    }

    public void setCreatedAr(Date createdAr) {
        this.createdAr = createdAr;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public Boolean getFavorited() {
        return favorited;
    }

    public void setFavorited(Boolean favorited) {
        this.favorited = favorited;
    }

    public Boolean getTruncated() {
        return truncated;
    }

    public void setTruncated(Boolean truncated) {
        this.truncated = truncated;
    }

    public String getIn_reply_to_status_id() {
        return in_reply_to_status_id;
    }

    public void setIn_reply_to_status_id(String in_reply_to_status_id) {
        this.in_reply_to_status_id = in_reply_to_status_id;
    }

    public String getInReplyToUserId() {
        return inReplyToUserId;
    }

    public void setInReplyToUserId(String inReplyToUserId) {
        this.inReplyToUserId = inReplyToUserId;
    }

    public String getInReplyToScreenName() {
        return inReplyToScreenName;
    }

    public void setInReplyToScreenName(String inReplyToScreenName) {
        this.inReplyToScreenName = inReplyToScreenName;
    }

    public Geo getGeo() {
        return geo;
    }

    public void setGeo(Geo geo) {
        this.geo = geo;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    public Integer getRepostsCount() {
        return repostsCount;
    }

    public void setRepostsCount(Integer repostsCount) {
        this.repostsCount = repostsCount;
    }

    public Integer getCommentsCount() {
        return commentsCount;
    }

    public void setCommentsCount(Integer commentsCount) {
        this.commentsCount = commentsCount;
    }

    public List<Place> getAnnotations() {
        return annotations;
    }

    public void setAnnotations(List<Place> annotations) {
        this.annotations = annotations;
    }

    public String getThumbnailPic() {
        return thumbnailPic;
    }

    public void setThumbnailPic(String thumbnailPic) {
        this.thumbnailPic = thumbnailPic;
    }

    public String getBmiddlePic() {
        return bmiddlePic;
    }

    public void setBmiddlePic(String bmiddlePic) {
        this.bmiddlePic = bmiddlePic;
    }

    public String getOriginalPic() {
        return originalPic;
    }

    public void setOriginalPic(String originalPic) {
        this.originalPic = originalPic;
    }

    public Integer getMlevel() {
        return mlevel;
    }

    public void setMlevel(Integer mlevel) {
        this.mlevel = mlevel;
    }

    public Visible getVisible() {
        return visible;
    }

    public void setVisible(Visible visible) {
        this.visible = visible;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((id == null) ? 0 : id.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Status other = (Status) obj;
        if (id == null) {
            if (other.id != null)
                return false;
        } else if (!id.equals(other.id))
            return false;
        return true;
    }
	
	class Visible {
	    private Integer type;
	    
	    @JSONField(name = "list_id")
	    private Integer listId;

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public Integer getListId() {
            return listId;
        }

        public void setListId(Integer listId) {
            this.listId = listId;
        }
	    
	}
}
